{template paome_header}
<style type="text/css">
    td { text-align:center;}
</style>
<link rel="stylesheet" href="static/calendar/js/calendar.css" />
<script type="text/javascript" charset="utf-8" src="static/calendar/calendar.php"></script>

<h4 style="padding-left:10px;;">
    <span>跑么杯大厅评论管理</span>
</h4>

  <div class="bs-docs-example table-align pt-15" style="clear:both;">
    <table class="table table-striped">
        <thead>
            <tr>
                <th>用户ID</th>
                <th>评论内容</th>
                <th>评论时间</th>
                <th>操作</th>
            </tr>
        </thead>
        <tbody>
            {if !$commentInfo}  
                <tr>
                    <td colspan="4">暂无记录</td>
                </tr>
            {else}

            {loop $commentInfo $k $v}
            <tr>
                <td>{$v['uid']}</td>
                <td>{$v['comment']}</td>
                <td>{$v['add_time']}</td>
                <td><a id="hide" data-id="{$v['comment_id']}">隐藏</a></td>
                <td style="display:none;">{$v['comment_id']}</td>
            </tr>
            {/loop}

            {/if}
        </tbody>
    </table>
    <div class="pagination">
        <ul>
            {$pageStr}
        </ul>
    </div>
</div>

<script>
  $(document).ready(function(){
    $("#hide").click(function(){
        var cid = $(this).attr('data-id');
        $.ajax({
            type:'POST',
            url:'?c=paome_hall&a=hideComment',
            data:{comment_id:cid},
            dataType:'json',
            success:function(d){
                if(d.status=='ok'){
                    window.location.reload();
                }else{
                    alert(d.error_msg);
                }
            }
        });

    });
  })
</script>

{template footer}
